package com.atguigu.gulimall.seckill.config;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.atguigu.common.exception.BizCodeEnume;
import com.atguigu.common.utils.R;

/**
 * 用于自定义限流处理逻辑 方法必须是static
 */
public class SeckillSentinelUrlBlockHandler {
    public static R handlerException1(BlockException exception) {
        return R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(),BizCodeEnume.TOO_MANY_REQUEST.getMsg());
    }
    public static R handlerException2(BlockException exception) {
        return R.error(BizCodeEnume.TOO_MANY_REQUEST.getCode(),BizCodeEnume.TOO_MANY_REQUEST.getMsg());
    }
}
